home *** CD-ROM | disk | FTP | other *** search
Wrap
<html> <head><script language="JavaScript"> <!-- Hide the script from old browsers -- //====================================================== // Java Script code by Java Script It! www.computan.on.ca/~todd/JavaScriptIt! //====================================================== function makearray(n) { this.length = n; for(var i = 1; i <= n; i++) this[i] = 0; return this; } hd= new makearray (16) // make the array for (i=0; i<10; i++) { hd[i] =i; } hd[10]="A"; hd[11]="B"; hd[12]="C"; hd[13]="D"; hd[14]="E"; hd[15]="F"; function fade (x,y) { for(var i = x; i < y; i=i+speed) { colour=i; setbgC (colour); } } function fadeOut (x,y) { for(var i = x; i > y; i=i-speed) { colour=i; setbgC (colour); } } function calc (colour) { x=hd[Math.floor(colour/16)] ; y=hd[colour%16]; return ""+x+y; } function setbgC (colour) { var finalc=calc (colour); document.bgColor="#"+"00"+"00"+finalc}speed= 2;fade ( 0, 179); //--end hiding--> </script> <title>Fade In and Fade Out</title> </head> <body onUnLoad="fadeOut( 179,0)" bgColor="#0000B3" text="FFFFFF"> <div align=center><font size=6 font="Arial"><b>Fade In and Fade Out</b></font></div><p> This page demonstrates both a fade in and a fade out at a fast speed. You can choose to have the page fade in and/or fade out to and from any custom color and at a custom speed. </body> </html>